#!/usr/bin/env python
# -*- coding:utf-8 -*-
import subprocess
#ret = subprocess.call(['route','printd'])
#print ret   #==>返回执行结果

#ret = subprocess.check_call(['route','printd'])
#print ret
'''
t = subprocess.Popen(["python"],stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
t.stdin.write("print 1\n")
t.stdin.write("print 2\n")
print t.communicate()
print t.pid
print t.poll()

'''
t=subprocess.Popen(['dir'],shell=True)
res=t.communicate()
print "==============="
print res